package com.hsl.hslcodemother.ai.model.enums;

import lombok.Getter;

/**
 * @Date 2025/9/5 17:15
 * @Author hsl
 */
@Getter
public enum CodeGenTypeEnum {
    HTML("原生HTML模式", "html"),

    MULTI_FILE("多文件模式", "multi-file");

    private String name;
    private String value;

    CodeGenTypeEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    // 根据value获取枚举
    public static CodeGenTypeEnum getEnumByValue(String value) {
        for (CodeGenTypeEnum valueEnum : values()) {
            if (valueEnum.value.equals(value)) {
                return valueEnum;
            }
        }
        return null;
    }
}
